Skip to content

Create rule S7609: AWS CloudWatch metrics namespace should not begin with AWS/ #5132

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

github-actions[bot]
Copy link
Contributor

You can preview this rule here (updated a few minutes after each push).

Review

A dedicated reviewer checked the rule description successfully for:

  • logical errors and incorrect information
  • information gaps and missing content
  • text style and tone
  • PR summary and labels follow the guidelines

@joke1196 joke1196 changed the title Create rule S7609 Create rule S7609: AWS CloudWatch metrics namespace should not begin with AWS/ Jun 24, 2025
Copy link

Quality Gate passed Quality Gate passed for 'rspec-tools'

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
0 Dependency risks
No data about Coverage
No data about Duplication

See analysis details on SonarQube

Copy link

Quality Gate passed Quality Gate passed for 'rspec-frontend'

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
0 Dependency risks
No data about Coverage
No data about Duplication

See analysis details on SonarQube

Copy link
Contributor

@thomas-serre-sonarsource thomas-serre-sonarsource left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! clear and concise. I left minor comments :)

@@ -0,0 +1,125 @@
This rule raises and issue when AWS CloudWatch `put_metric_data` namespace begins with `AWS/`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This rule raises and issue when AWS CloudWatch `put_metric_data` namespace begins with `AWS/`
This rule raises an issue when AWS CloudWatch `put_metric_data` namespace begins with `AWS/`


=== What is the potential impact?

Using AWS service namespaces can lead to metric publishing failures, data corruption, or unexpected behavior in CloudWatch dashboards. It may also cause confusion between your custom metrics and official AWS service metrics, making monitoring and troubleshooting more difficult. Additionally, AWS may reject such metric publications or they may interfere with existing service metrics.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Using AWS service namespaces can lead to metric publishing failures, data corruption, or unexpected behavior in CloudWatch dashboards. It may also cause confusion between your custom metrics and official AWS service metrics, making monitoring and troubleshooting more difficult. Additionally, AWS may reject such metric publications or they may interfere with existing service metrics.
Using AWS service namespaces can lead to metric publishing failures, data corruption, or unexpected behavior in CloudWatch dashboards. It may also cause confusion between your custom metrics and official AWS service metrics, making monitoring and troubleshooting more difficult. Additionally, AWS may reject such metric publications, or they may interfere with existing service metrics.


=== Documentation

* https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_PutMetricData.html[AWS CloudWatch PutMetricData API Reference]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_PutMetricData.html[AWS CloudWatch PutMetricData API Reference]
* AWS docs - https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_PutMetricData.html[AWS CloudWatch PutMetricData API Reference]

Comment on lines +109 to +110
* https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#Namespace[CloudWatch Concepts - Namespaces]

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#Namespace[CloudWatch Concepts - Namespaces]
* AWS docs - https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#Namespace[CloudWatch Concepts - Namespaces]

Comment on lines +9 to +10
"tags": [
],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"tags": [
],
"tags": [
"aws"
],

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants